Package reflection

Class ShowClass

java.lang.Object
reflection.ShowClass

public class ShowClass extends Object
A program that displays a class synopsis for the named class This example is from _Java Examples in a Nutshell_. (http://www.oreilly.com) This example is provided WITHOUT ANY WARRANTY either expressed or implied. You may study, use, modify, and distribute it for non-commercial purposes. For any commercial use, see http://www.davidflanagan.com/javaexamples
Author:
David Flanagan, Robert C. Duvall
  • Constructor Details

    • ShowClass

      public ShowClass()
  • Method Details

    • makeClass

      public static void makeClass(Class<?> clazz)
      Tries to create an object using both a default constructor and one that takes a String.
    • printClass

      public static void printClass(Class<?> c)
      Display modifiers, name, superclass and interfaces of a class or interface. Then list all constructors, fields, and methods.
    • main

      public static void main(String[] args) throws ClassNotFoundException
      Throws:
      ClassNotFoundException